package base;

import java.io.Serializable;

import helper.request.contacts.ApproveOrRejectAddRequest;

public class Msg implements Serializable {
	private static final long serialVersionUID = -6618811995012193254L;
	private String message;
	private int currentuserid;
	private int targetuserid;
	private boolean withchoice;
	public Msg(String msg,int c,int t,boolean w){
		this.message=msg;
		this.currentuserid=c;
		this.targetuserid=t;
		this.withchoice=w;
	}
	public String getmessage(){return this.message;}

	public boolean isWithChoice(){
		return withchoice;
	}
	public String toString(){
		return this.message;
	}
    public ApproveOrRejectAddRequest agree(){
        ApproveOrRejectAddRequest req=new ApproveOrRejectAddRequest(currentuserid,targetuserid,true);
        return req;
    }
    public ApproveOrRejectAddRequest decline(){
    	return new ApproveOrRejectAddRequest(currentuserid,targetuserid,false);
    }
}
